# Check the connect status of internet
function check_ip_status()
{
    ping -c 3 -i 0.2 -W 3 $1 &> /dev/null
    if [ $? -eq 0 ];then
        return 0
    else
        return -1
    fi
}

check_ip_status gitee.com

if [ $? -ne 0 ]
then
    echo "cannot connect guestconf server:gitee.com"
else
    echo "connection!"
fi